/**
 * 旅行社详情
 * @param {*} company 旅行社信息
 * @param {*} flag true: 审核页, false: 详情页
 */
module.exports = function ($scope, $resource, $modalInstance, $modal, company, flag, toaster) {

	$scope.company = company;
	$scope.flag = flag;

	//审核结果
	$scope.result = function(result){
		var para = {
			'company_code': company.company_code,
			'result': result
		}
		$resource('/api/ac/atc/companyService/checkCompany', {}, {}).save(para, function(res){
            if (res.errcode === 0) {
				console.log(res.data);
            } else {
                toaster.error({title: '', body: res.errmsg});
                // toaster.error({title: '', body: '审核失败, 请重试'});
            }
        });
	}

	$scope.close = function () {
		$modalInstance.dismiss('cancel');
    }


};